package com.djnt.catering.sales_promotion;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

import com.djnt.catering.R;
import com.djnt.catering.database.HotNews;

public class UserCompanyFavorActivity extends Activity {

	private static final String TAG = "UserCompanyFavorActivity";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.user_company_favor);

		Cursor c = this.getContentResolver().query(HotNews.CONTENT_URI, null,
				null, null, null);
		ListView v = (ListView) this.findViewById(R.id.list1);
		v.setAdapter(new SalesPromotionListAdapter(this, R.layout.sales_promotion_user_view, c));

	}

	public void onNewFavor(View view) {
		Intent i = new Intent(this, UserCompanyFavorNew.class);
		startActivity(i);
	}

	public void onSearchFavor(View view) {
		Intent i = new Intent(this, UserCompanyFavorSearch.class);
		startActivity(i);
	}

	public void onSortFavor(View view) {
		Intent i = new Intent(this, UserCompanyFavorSort.class);
		startActivity(i);
	}

	public void onSync(View view) {
		Intent i = new Intent(this, UserCompanyFavorSync.class);
		startActivity(i);
	}

	public void onSettings(View view) {
		Intent i = new Intent(this, UserCompanyFavorSettings.class);
		startActivity(i);
	}
}
